package com.service.impl;

import com.bean.PlaceOrder;
import com.dao.PlaceOrderMapper;
import com.service.PlaceOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 订货表数据实现类
 */
@Service("placeOrderService")
public class PlaceOrderServiceImpl implements PlaceOrderService {

    @Autowired
    private PlaceOrderMapper placeOrderMapper;
    @Override
    public int save(PlaceOrder placeOrder) {
        return placeOrderMapper.insert(placeOrder);
    }

    @Override
    public int remove(PlaceOrder placeOrder) {
        return placeOrderMapper.delete(placeOrder);
    }

    @Override
    public int modify(PlaceOrder placeOrder) {
        return placeOrderMapper.update(placeOrder);
    }

    @Override
    public List<PlaceOrder> find(PlaceOrder placeOrder) {
        return placeOrderMapper.select(placeOrder);
    }

    @Override
    public int count(Map<String, Object> map) {
        return placeOrderMapper.selectCount(map);
    }

    @Override
    public List<PlaceOrder> query(Map<String, Object> map) {
        return placeOrderMapper.selectByPage(map);
    }
}
